from django import newforms as forms
from whatyou.lib.utils import *
import datetime

# Y:W:D:H:M

DURATION_CHOICES = (("10:0:0:0:0", "always"),
                    ("0:0:0:0:10", "for the next few minutes"),
                    ("0:0:0:1:0", "for the next hour"),
                    ("0:0:0:2:0", "for the next two hours"),
                    ("0:0:0:8:0", "for most of the day"),
                    ("0:0:1:0:0", "all day"),
                    ("0:0:2:0:0", "tomorrow"),
                    ("0:1:0:0:0", "this week"),
                    ("0:4:0:0:0", "this month"),
                    ("0:8:0:0:0", "next month"),
                    ("1:0:0:0:0", "this year"),
                    ("2:0:0:0:0", "next year"),
                    )

GENDER_CHOICES = (("m", "Male"), ("f", "Female"))

class PostForm(forms.Form):
    verb = forms.CharField(required=True, max_length=255, label="Pick a verb...")
    body = forms.CharField(max_length=255, label="Enter your update...")
    finish_time = forms.ChoiceField(choices=DURATION_CHOICES, label="Choose a duration...")

class AddFriendForm(forms.Form):
    email_address = forms.EmailField(label="Email address:")
    notify_by_email = forms.BooleanField(required=False, label="Notify updates by Email")

class EditFriendForm(forms.Form):
    notify_by_email = forms.BooleanField(required=False, label="Notify updates by Email")

class UpdateProfileForm(forms.Form):
    friendly_name = forms.CharField(required=False, max_length=50)
    gender = forms.ChoiceField(required=False, choices=GENDER_CHOICES)